<style scoped>
	.navbar {
		background-color: #3c8dbc;
	}
	
	.skin-blue,
	.main-header,
	.logo {
		background-color: #367fa9;
		color: #fff;
		border-bottom: 0 solid transparent;
	}
	
	.skin-blue .wrapper,
	.skin-blue .main-sidebar,
	.skin-blue .left-side {
		background-color: #222d32;
	}
	
	.skin-blue,
	.main-header,
	.navbar,
	.sidebar-toggle {
		color: #fff;
	}
	
	.skin-blue,
	.main-header,
	.navbar,
	.sidebar-toggle {
		color: #fff;
	}
	
	.main-header .logo {
		height: 35px;
		line-height: 32px;
	}
	
	.skin-blue .main-header,
	.navbar .nav>li>a {
		color: #fff;
	}
	
	.content-wrapper {
		background: #fff;
	}
	
	.content-header {
		background: #ecf0f5;
	}
	
	#nav_title.breadcrumb {
		text-align: left;
	}
	
	.headera {
		color: #4b646f;
		background: #1a2226;
		padding: 10px 25px 10px 15px;
		font-size: 12px;
		text-align: left;
	}
	
	.main-sidebar {
		background-color: #222d32;
		text-align: left;
	}
</style>
<template>
	<div>
		<header class="main-header">
			<a class="logo">
				<span class="logo-lg"><b>后台管理系统</b></span>
			</a>
			<nav class="navbar navbar-static-top" role="navigation">
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
					<span class="sr-only">Toggle navigation</span>
				</a>
				<div style="float:left;color:#fff;padding:15px 10px;">欢迎 {{user.username}}</div>
				<div class="navbar-custom-menu">
					<ul class="nav navbar-nav">
						<li>
							<a href="javascript:;"><i class="fa fa-lock"></i> &nbsp;修改密码</a>
						</li>
						<li>
							<a href="logout"><i class="fa fa-sign-out"></i> &nbsp;退出系统</a>
						</li>
					</ul>
				</div>
			</nav>
		</header>
	</div>
</template>
<script>
	import Vue from 'vue'
	export default {
		name: 'index',
		data() {
			return {
				text: '',
				user: {}
			};
		},
		methods: {
			getUser: function(event) {
				var vm = this;
				$.ajax({
					type: "POST",
					url: "http://10.32.0.155/sy-erp/sys/user/info",
					data: '',
					dataType: "json",
					xhrFields: {
						withCredentials: true
					},
					success: function(data) {
//						console.log(data.user)
						vm.user = data.user;
					}
				});
			}
		},
		created: function() {
			//gitmenulist
			this.getUser();
		}
	};
</script>